import Field from '@model/entity/Field'
// import { TaskExportGroupValueEnum } from '@src/component/business/BizListView/Impl/BizListViewTask/BizListViewTaskModel'

export interface TaskExportGroupChecked {
  
  [x: string]: string[]
  // [TaskExportGroupValueEnum.Task]: string[]
  // [TaskExportGroupValueEnum.TaskReceipt]: string[]
  // [TaskExportGroupValueEnum.System]: string[]
}

export interface TaskExportGroup {
  label: string
  value: string
  inputType?: string
  columns: Field[],
  cardId?: any
}

export interface BizListViewTaskOptionsInterface {
  // 是否获取工单类型字段
  isFetchTaskFields?: boolean
  // 是否获取工单类型回执字段
  isFetchTaskReceiptFields?: boolean
  // 是否获取工单类型附加卡片信息
  isFetchTaskCardFields?: boolean 
  // 是否获取用户开启的配置节点 以及工单搜索范围 和 异常原因字段值
  isFetchTurnOnTaskExceptionNodeInfo?: boolean
  // 是否构建高级搜索列
  isBuildAdvancedColumns?: boolean
  // 是否构建导出列
  isBuildExportColumns?: boolean
}

export class BizListViewTaskOptions {
  // 是否获取工单类型字段
  public isFetchTaskFields: boolean = true
  // 是否获取工单类型回执字段
  public isFetchTaskReceiptFields: boolean = true
  // 是否获取工单类型附加卡片信息
  public isFetchTaskCardFields: boolean = true
  // 是否获取用户开启的配置节点 以及工单搜索范围 和 异常原因字段值
  public isFetchTurnOnTaskExceptionNodeInfo: boolean = true
  // 是否构建高级搜索列
  public isBuildAdvancedColumns: boolean = true
  // 是否构建导出列
  public isBuildExportColumns: boolean = true
  
  constructor(options: BizListViewTaskOptionsInterface = {}) {
    this.isFetchTaskFields = Boolean(options.isFetchTaskFields) || true
    this.isFetchTaskReceiptFields = Boolean(options.isFetchTaskReceiptFields) || true
    this.isFetchTaskCardFields = Boolean(options.isFetchTaskCardFields) || true
    this.isFetchTurnOnTaskExceptionNodeInfo = Boolean(options.isFetchTurnOnTaskExceptionNodeInfo) || true
    this.isBuildAdvancedColumns = Boolean(options.isBuildAdvancedColumns) || true
    this.isBuildExportColumns = Boolean(options.isBuildExportColumns) || true
  }
}